﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:datavis="using:WinRTXamlToolkit.Controls.DataVisualization"
    xmlns:charts="using:WinRTXamlToolkit.Controls.DataVisualization.Charting"
    xmlns:chartingprimitives="using:WinRTXamlToolkit.Controls.DataVisualization.Charting.Primitives">
    <Style
        TargetType="charts:Chart">
        <Setter
            Property="BorderBrush"
            Value="Black" />
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Padding"
            Value="10" />
        <Setter
            Property="Palette">
            <Setter.Value>
                <charts:ResourceDictionaryCollection>
                    <!-- Blue -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FFB9D6F7" />
                            <GradientStop
                                Color="#FF284B70"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                    <!-- Red -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FF830F0F" />
                            <GradientStop
                                Color="#FFE11919"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                    <!-- Light Green -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FF10FF00" />
                            <GradientStop
                                Color="#FF00C233"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                    <!-- Yellow -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FFB9D6F7" />
                            <GradientStop
                                Color="#FF284B70"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                    <!-- Indigo -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FFA9A3BD" />
                            <GradientStop
                                Color="#FF382C6C"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                    <!-- Magenta -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FFB1A1B1" />
                            <GradientStop
                                Color="#FF50224F"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                    <!-- Dark Green -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FF9DC2B3" />
                            <GradientStop
                                Color="#FF1D7554"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                    <!-- Gray Shade -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FFB5B5B5" />
                            <GradientStop
                                Color="#FF4C4C4C"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                    <!-- Blue -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FF98C1DC" />
                            <GradientStop
                                Color="#FF0271AE"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                    <!-- Brown -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FFC1C0AE" />
                            <GradientStop
                                Color="#FF706E41"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                    <!-- Cyan -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FFADBDC0" />
                            <GradientStop
                                Color="#FF446A73"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                    <!-- Special Blue -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FF2F8CE2" />
                            <GradientStop
                                Color="#FF0C3E69"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                    <!-- Gray Shade 2 -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FFDCDCDC" />
                            <GradientStop
                                Color="#FF757575"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                    <!-- Gray Shade 3 -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FFF4F4F4" />
                            <GradientStop
                                Color="#FFB7B7B7"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                    <!-- Gray Shade 4 -->
                    <ResourceDictionary>
                        <LinearGradientBrush
                            x:Key="Background"
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FFF4F4F4" />
                            <GradientStop
                                Color="#FFA3A3A3"
                                Offset="1" />
                        </LinearGradientBrush>
                        <Style
                            x:Key="DataPointStyle"
                            TargetType="Control">
                            <Setter
                                Property="Background"
                                Value="{StaticResource Background}" />
                        </Style>
                        <Style
                            x:Key="DataShapeStyle"
                            TargetType="Shape">
                            <Setter
                                Property="Stroke"
                                Value="{StaticResource Background}" />
                            <Setter
                                Property="StrokeThickness"
                                Value="2" />
                            <Setter
                                Property="StrokeMiterLimit"
                                Value="1" />
                            <Setter
                                Property="Fill"
                                Value="{StaticResource Background}" />
                        </Style>
                    </ResourceDictionary>
                </charts:ResourceDictionaryCollection>
            </Setter.Value>
        </Setter>
        <Setter
            Property="TitleStyle">
            <Setter.Value>
                <Style
                    TargetType="datavis:Title">
                    <Setter
                        Property="FontSize"
                        Value="16" />
                    <Setter
                        Property="HorizontalAlignment"
                        Value="Center" />
                    <Setter
                        Property="Margin"
                        Value="0,10,0,10" />
                </Style>
            </Setter.Value>
        </Setter>
        <Setter
            Property="LegendStyle">
            <Setter.Value>
                <Style
                    TargetType="datavis:Legend">
                    <Setter
                        Property="Margin"
                        Value="15,0,15,0" />
                    <Setter
                        Property="VerticalAlignment"
                        Value="Center" />
                    <Setter
                        Property="Background">
                        <Setter.Value>
                            <LinearGradientBrush
                                EndPoint="0.442,0.005"
                                StartPoint="0.558,0.995">
                                <GradientStop
                                    Color="#FFDBDBDB" />
                                <GradientStop
                                    Color="#FFFFFFFF"
                                    Offset="1" />
                            </LinearGradientBrush>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter
            Property="ChartAreaStyle">
            <Setter.Value>
                <Style
                    TargetType="Panel">
                    <Setter
                        Property="MinWidth"
                        Value="100" />
                    <Setter
                        Property="MinHeight"
                        Value="75" />
                </Style>
            </Setter.Value>
        </Setter>
        <Setter
            Property="PlotAreaStyle">
            <Setter.Value>
                <Style
                    TargetType="Grid">
                    <Setter
                        Property="Background">
                        <Setter.Value>
                            <LinearGradientBrush
                                EndPoint="0.457,0.296"
                                StartPoint="0.459,1.296">
                                <GradientStop
                                    Color="#FFCBCBCB" />
                                <GradientStop
                                    Color="#FFFFFFFF"
                                    Offset="1" />
                            </LinearGradientBrush>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="charts:Chart">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Padding="{TemplateBinding Padding}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition
                                    Height="Auto" />
                                <RowDefinition
                                    Height="*" />
                            </Grid.RowDefinitions>

                            <datavis:Title
                                Content="{TemplateBinding Title}"
                                Style="{TemplateBinding TitleStyle}" />

                            <!-- Use a nested Grid to avoid possible clipping behavior resulting from ColumnSpan+Width=Auto -->
                            <Grid
                                Grid.Row="1"
                                Margin="0,15,0,15">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition
                                        Width="*" />
                                    <ColumnDefinition
                                        Width="Auto" />
                                </Grid.ColumnDefinitions>

                                <datavis:Legend
                                    x:Name="Legend"
                                    Style="{TemplateBinding LegendStyle}"
                                    Grid.Column="1" />
                                <chartingprimitives:EdgePanel
                                    x:Name="ChartArea"
                                    Style="{TemplateBinding ChartAreaStyle}">
                                    <Grid
                                        Canvas.ZIndex="-1"
                                        Style="{TemplateBinding PlotAreaStyle}" />
                                    <Border
                                        Canvas.ZIndex="10"
                                        BorderBrush="#FF919191"
                                        BorderThickness="1" />
                                </chartingprimitives:EdgePanel>
                            </Grid>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
